package kr.co.redcircle.net.multicast;



public class MulticastTestCase {

	public static void main(String args[]){
		
		MulticastRequest request0 = new MulticastRequest("COMM00");
		request0.put("from", "node1");
		request0.put("to", "master");
		request0.put("business", "regist");
		request0.put("method", "node");
		MulticastRequest request1 = new MulticastRequest("COMM01");
		MulticastRequest request2 = new MulticastRequest("COMM02");
		MulticastRequest request3 = new MulticastRequest("COMM03");
		MulticastRequest request4 = new MulticastRequest("EXIT");
		
		MulticastNetworkService.init("224.192.0.1", 9876, 16511);
		MulticastNetworkService.startListener();
		for (int i=0; i<10000; i++){
			MulticastNetworkService.send(request0);
			MulticastNetworkService.send(request1);
			MulticastNetworkService.send(request2);
			MulticastNetworkService.send(request3);
			MulticastNetworkService.send(request0);
			MulticastNetworkService.send(request1);
			MulticastNetworkService.send(request2);
			MulticastNetworkService.send(request3);
//			MulticastNetworkService.send(request4);
		}
		  
	}

}
